package com.originalpoint.origin_server.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *订单菜品实体类
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Schema(name = "OrderDish" ,description = "菜品和订单的对应信息")
public class OrderDish {
    @TableId(type = IdType.AUTO)
    @Schema(name = "orderID" ,description = "订单ID")
    private Integer orderID;

    @Schema(name = "dishID" ,description = "菜品ID")
    private Integer dishID;

    @Schema(name = "quantityOrdered" ,description = "单个菜品的数量")
    private  Integer quantityOrdered;

    @Schema(name = "time" ,description = "生成订单的时间")
    private String time;

//    orderDish测试用
    public OrderDish(Integer dishID, Integer quantityOrdered) {
        this.dishID = dishID;
        this.quantityOrdered = quantityOrdered;
    }
}
